<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateClientsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('clients', function (Blueprint $table) {
            $table->increments('id');
            $table->enum('type', ['1', '2', '3']);
            $table->string('mobile', 13);
            $table->string('password', 64);
            $table->string('nickname', 30)->default('');
            $table->string('realname', 30)->default('');
            $table->string('email', 60)->default('');
            $table->string('phone', 13)->default('');
            $table->string('company')->default('');
            $table->string('portrait')->default('');
            $table->enum('sex', ['1', '2'])->default('1');
            $table->enum('switch', ['1', '2'])->default('1');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('clients');
    }
}
